home *** CD-ROM | disk | FTP | other *** search
/ Remix Doll 3: Dirty Sally / Remix Doll 3: Dirty Sally.iso / drtyslly.exe / MAIN_FNL.DXR / 04952_TRoomIcon.ls < prev    next >
Encoding:
Text File  |  1995-02-11  |  1.4 KB  |  73 lines

  1. property ancestor, fRoomName
  2. global kRoomNames, gApp
  3.  
  4. on birth me, vSprNum, vID
  5.   set ancestor to NewObj("TAnim", vSprNum, vID)
  6.   mIRoomIcon(me)
  7.   return me
  8. end
  9.  
  10. on mIRoomIcon me
  11.   mInvisible(me)
  12.   set aHiliteCastName to mGtID(me) & "A"
  13.   set the castNum of sprite mGtSprNum(me) to the number of cast aHiliteCastName
  14.   updateStage()
  15.   mStRoomName(me, EMPTY)
  16. end
  17.  
  18. on mDeath me
  19.   mVisible(me)
  20. end
  21.  
  22. on mStRoomName me, vRoomName
  23.   set fRoomName to vRoomName
  24. end
  25.  
  26. on mGtRoomName me
  27.   return fRoomName
  28. end
  29.  
  30. on mComplete me
  31.   mStCastNum(me, the number of cast (fRoomName & "IconCmp"))
  32. end
  33.  
  34. on mEnterMouse me
  35.   mVisible(me)
  36.   updateStage()
  37. end
  38.  
  39. on mLeaveMouse me
  40.   mInvisible(me)
  41.   updateStage()
  42. end
  43.  
  44. on mMouseUp me
  45.   if mGtCurRoomName(mGtSupervisor(me)) <> mGtRoomName(me) then
  46.     mStCurRoomName(mGtSupervisor(me), mGtRoomName(me))
  47.     stpSnd(1)
  48.     stpSnd(2)
  49.     set aRoomNum to getPos(kRoomNames, mGtRoomName(me))
  50.     if aRoomNum = 1 then
  51.       set the volume of sound 2 to 100
  52.     else
  53.       if aRoomNum = 2 then
  54.         set the volume of sound 2 to 200
  55.       else
  56.         if aRoomNum = 3 then
  57.           set the volume of sound 2 to 130
  58.         else
  59.           set the volume of sound 2 to 200
  60.         end if
  61.       end if
  62.     end if
  63.     hideNavigator()
  64.     set the puppet of sprite 24 to 1
  65.     set the locH of sprite 24 to -1000
  66.     updateStage()
  67.     set the puppet of sprite 24 to 0
  68.     mNewMainLayer(gApp, "TCkrchLayer", mGtRoomName(me))
  69.   else
  70.     hideNavigator()
  71.   end if
  72. end
  73.